package com.curvebreakers.wheresmystuff.tests.model;

//Bryan Levy

import android.test.AndroidTestCase;
import com.curvebreakers.wheresmystuff.model.Category;
import com.curvebreakers.wheresmystuff.model.Entry;
import com.curvebreakers.wheresmystuff.model.EntryType;
import java.util.Date;
import junit.framework.Assert;

public class EntryBuilderTest extends AndroidTestCase
 {
	private Entry test1;
	public void testbuild1() throws Exception{
		Entry.Builder b0 = new Entry.Builder()
		.zipCode("30332")
		.userId(905)
		.userEmail("test@test")
		.title("testing object")
		.reward(500)
		.resolved(true)
		.id(0)
		.entryType(EntryType.FOUND)
		.description("fully testable")
		.date(new Date(3000330))
		.category(Category.KEEPSAKE);
		test1 = b0.build();
		
		Assert.assertEquals("Test 1 reward",500,test1.getReward());
		Assert.assertEquals("Test 1 category",Category.KEEPSAKE,test1.getCategory());
		Assert.assertEquals("Test 1 date",new Date(3000330),test1.getDate());
		Assert.assertEquals("Test 1 description","fully testable",test1.getDescription());
		Assert.assertEquals("Test 1 entry type",EntryType.FOUND,test1.getEntryType());
		Assert.assertEquals("Test 1 id",0,test1.getId());
		Assert.assertEquals("Test 1 resolved",true,test1.isResolved());
		Assert.assertEquals("Test 1 title","testing object",test1.getTitle());
		Assert.assertEquals("Test 1 email","test@test",test1.getUserEmail());
		Assert.assertEquals("Test 1 userID",905,test1.getUserId());
		Assert.assertEquals("Test 1 zip","30332",test1.getZipCode());
		
	}
	
	
}
